<template>
<div>
    <span class="des">Einno始终把满足您可靠性水平的产品始终放在首要位置，我们通过在所有的产品、工艺设计和制造过程中引入高质量和可靠性检查实践这一承诺。
发运的产品实现“零缺陷”始终是我们的目标</span>
<table>
                    <thead>
                        <tr>
                            <th>Part Number</th>
                            <th>Material Declaration</th>
                            <th>Reliability Data</th>
                            <th>Pin/Package Drawing</th>
                            <th>CAD Symbols &Footprints & 3D Models</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(item) in tableData">
                            <td v-for="(_, index) in columns" :key="index">
                                <div class="flex items-center"> 
                               <span> {{ item[_.key] }}</span>
                               <div v-if="_.key=='a2'||_.key=='a3'||_.key=='a5'" class="w-[16px] h-[16px] ml-[12px]">
                                <img :src="$export.src" class="w-[16px] h-[16px]" alt="" >
                                <img :src="$exportHover.src" class="w-[16px] h-[16px] hidden hover" alt="">
                            </div>
                            <div v-if="_.key=='a4'" class="w-[16px] h-[16px] ml-[12px]">
                                <img :src="download.src" class="w-[16px] h-[16px]" alt="" >
                                <img :src="downloadHover.src" class="w-[16px] h-[16px] hidden hover" alt="">
                            </div>
                            </div>
                            </td>
                        </tr>
                        </tbody>
                </table>
</div>
</template>
<script setup>

import { ref } from 'vue'
import download from '@assets/download.png'
import downloadHover from '@assets/download-hover.png'
import $export from '@assets/export.png'
import $exportHover from '@assets/export-hover.png'

const columns =ref([
   {key:'a1', label: '产品类型' },
    {key:'a2', label: '图像',slot:'img' },
    {key:'a3', label: '通道数量' },
    {key:'a4', label: '分辨率' },
    {key:'a5', label: '帧率' },
])
const tableData= ref([
    {a1:'ES5030ED6X#TRPBF' ,a2: '材料声明', a3:'质量和可靠性' ,a4:'6-Lead（1.5mm×1.5mm×0.85mm）', a5: 'AD&CADENCE'},
    {a1:'ES5030ED6X#TRPBF' ,a2: '材料声明', a3:'质量和可靠性' ,a4:'6-Lead（1.5mm×1.5mm×0.85mm）', a5: 'AD&CADENCE'},
])
</script>
<style lang="scss" scoped>
.des{
    font-family: Source Han Sans;
    font-size: 16px;
    font-weight: 500;
    color: #3D3D3D;
    margin-top: 20px;
    padding-left: 25px;
    box-sizing: border-box;
    display: block;
}
table{
    width: 100%;
    margin-top: 20px;
}
th{
    height: 60px;
    background-color: #712C2F;
    font-family: Source Han Sans;
    font-size: 16px;
    color: #fff;
    text-align: center;
}
tr:hover{
    img{
        display: none;
    }
    .hidden{
        display: block;
    }
}
td{
    height: 60px;
    text-align: center;
    min-width: 240px;
    padding-left: 20px;
    box-sizing: border-box;
}
</style>